#ifndef FRIEND_H
#define FRIEND_H

#include <QWidget>
#include <QTextEdit>
#include <QListWidget>
#include <QLineEdit>
#include <QPushButton>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include "online.h"
#include "protocol.h"
class Friend : public QWidget
{
    Q_OBJECT
public:
    explicit Friend(QWidget *parent = nullptr);
    void showAllOnlineUsr(PDU *pdu);

    QString m_strSearchName;

signals:

public slots:
    void showOnline();
    void searchUsr();

private:
    QTextEdit *m_pShowMsgTE;//信息显示
    QListWidget *m_pFriendListWidget;//好友列表
    QLineEdit *m_pInputMsgLE;//输入框

    QPushButton *m_pDelFriend;//删除好友
    QPushButton *m_pFlushFriendPB;//刷新
    QPushButton *m_pShowOnlineUsrPB;//显示
    QPushButton *m_pSearchUsrPB;//搜索
    QPushButton *m_pMsgSendPB;//信息发送
    QPushButton *m_pPrivateChatPB;//私聊

    Online *m_pOnline;


};

#endif // FRIEND_H
